package com.erp.storage.dao.idl;


import java.util.BitSet;
import java.util.Map;
import java.util.Set;
import java.util.Vector;

import com.erp.storage.dao.idl.StorageDdo.StockDdo;
import com.erp.storage.dao.idl.StorageDdo.StockFilterDdo;
import com.paipai.lang.uint16_t;
import com.paipai.lang.uint32_t;
import com.paipai.lang.uint64_t;
import com.paipai.lang.uint8_t;
import com.paipai.util.annotation.ApiProtocol;
import com.paipai.util.annotation.Field;
import com.paipai.util.annotation.HeadApiProtocol;
import com.paipai.util.annotation.Member;


@HeadApiProtocol(cPlusNamespace = "erp::storage::dao", needInit = true, needReset = true, serviceType="dao", platformType="erp")
public class StorageDao {
	
	@ApiProtocol(cmdid = "0xc05e1801L", desc = " 写入仓库信息 ")
	class AddStock
	{
		class Req 
		{
			@Field(desc = "机器码，必填 ")
	        String machineKey;

	        @Field(desc = "调用来源，必填 ")
	        String source;

	        @Field(desc = "场景id，必填 ")
	        uint32_t sceneId;	
	        
			@Field(desc = "功能选项，扩展选填 ")
			uint32_t option;
			
			@Field(desc = "仓库信息，必填 ")
			StockDdo StockInfo;

			@Field(desc = "请求保留字 ")
			String inReserve;
		}
		class Resp 
		{
			@Field(desc = "错误信息 ")
			String errmsg;
			
			@Field(desc = "返回保留字  ")
			String outReserve;
			
			@Field(desc = "返回添加成功的SysNo ")
			uint64_t SysNo;
		}
	};
	
	@ApiProtocol(cmdid = "0xc05e1802L", desc = " 逻辑删除仓库信息 ")
	class DeleteStock
	{
		class Req 
		{
			@Field(desc = "机器码，必填 ")
	        String machineKey;

	        @Field(desc = "调用来源，必填 ")
	        String source;

	        @Field(desc = "场景id，必填 ")
	        uint32_t sceneId;	
	        
			@Field(desc = "功能选项，扩展选填 ")
			uint32_t option;
			
			@Field(desc = "需删除的仓库ID，必填 ")
			Set<uint64_t> FStockSysNo;

			@Field(desc = "请求保留字 ")
			String inReserve;
		}
		class Resp 
		{
			@Field(desc = "错误信息 ")
			String errmsg;
			
			@Field(desc = "删除失败的错误码")
			Map<uint64_t,uint32_t> errorCode;
			
			@Field(desc = "删除失败的错误信息")
			Map<uint64_t,String> errorMsg;
			
			@Field(desc = "返回保留字  ")
			String outReserve;
		}
	};
	
	@ApiProtocol(cmdid = "0xc05e1803L", desc = " 修改仓库信息 ")
	class UpdateStock
	{
		class Req 
		{
			@Field(desc = "机器码，必填 ")
	        String machineKey;

	        @Field(desc = "调用来源，必填 ")
	        String source;

	        @Field(desc = "场景id，必填 ")
	        uint32_t sceneId;	
	        
			@Field(desc = "功能选项，扩展选填 ")
			uint32_t option;
			
			@Field(desc = "仓库信息，必填 ")
			StockDdo StockInfo;

			@Field(desc = "请求保留字 ")
			String inReserve;
		}
		class Resp 
		{
			@Field(desc = "错误信息 ")
			String errmsg;
			
			@Field(desc = "返回保留字  ")
			String outReserve;
		}
	};
	
	
	
	@ApiProtocol(cmdid = "0xc05e1804L", desc = " 根据ID获取仓库信息 ")
	class GetStockByIds
	{
		class Req 
		{
			@Field(desc = "机器码，必填 ")
	        String machineKey;

	        @Field(desc = "调用来源，必填 ")
	        String source;

	        @Field(desc = "场景id，必填 ")
	        uint32_t sceneId;					
			
			@Field(desc = "需获取的仓库ID，必填 ")
			Set<uint64_t> IDList;

			@Field(desc = "请求保留字 ")
			String inReserve;
		}
		class Resp 
		{
			@Field(desc = "错误信息 ")
			String errmsg;
			
			@Field(desc = "仓库列表信息")
			Vector<StockDdo> StockList;
			
			@Field(desc = "返回保留字  ")
			String outReserve;
		}
	};
	
	@ApiProtocol(cmdid = "0xc05e1805L", desc = " 根据filter获取仓库信息 ")
	class GetStockList
	{
		class Req 
		{
			@Field(desc = "机器码，必填 ")
	        String machineKey;

	        @Field(desc = "调用来源，必填 ")
	        String source;

	        @Field(desc = "场景id，必填 ")
	        uint32_t sceneId;					
			
			@Field(desc = "过滤器，必填 ")
			StockFilterDdo StockFilter;

			@Field(desc = "请求保留字 ")
			String inReserve;
		}
		class Resp 
		{
			@Field(desc = "错误信息 ")
			String errmsg;
			
			@Field(desc = "仓库总数")
			uint32_t total;
			
			@Field(desc = "仓库列表信息")
			Vector<StockDdo> StockList;
			
			@Field(desc = "返回保留字  ")
			String outReserve;	
		}
	};
	
}
